#include "AnimationVolcan.h"
#include "CSurface.h"

#include <SDL/SDL.h>
#include <iostream>

using namespace std;

SDL_Surface *AnimationVolcan::sprites = NULL;

int AnimationVolcan::initialized = 0;

AnimationVolcan::AnimationVolcan(){
  this->width = 84;
  this->height = 157;
  this->MaxFrames = 9;
  this->FrameRate = 230;
  this->k=1;
  this->p=4;
  if(!this->initialized){
    /// Cargamos los Sprites
    if((this->sprites
          =CSurface::OnLoad("images/volcan.bmp"))==NULL){
      cout << "Algo salio mal cargando sprites" << endl;
      exit(EXIT_FAILURE);
    }
    CSurface::Transparent(this->sprites, 0, 183, 239);
    this->initialized = 1;
  }
}

SDL_Surface* AnimationVolcan::getFrame(){
    return this->sprites;
}

